<HTML>
<HEAD>
  <!-- Created with AOLpress/2.0 -->
  <!-- AP: Created on: 18-Jan-2002 -->
  <!-- AP: Last modified: 11-Sep-2009 -->
  <TITLE>Writing scripts to change fonts in FontForge</TITLE>
  <LINK REL="icon" href="fftype16.png">
  <LINK REL="stylesheet" TYPE="text/css" HREF="FontForge.css">
</HEAD>
<BODY>
<DIV id="in">
  <H1 ALIGN=Center>
    Writing scripts to change fonts in FontForge
  </H1>
  <P>
  FontForge includes two interpreters so you can write scripts to modify fonts.
  One of these interpreters is <A HREF="python.html">python</A>, one is a legacy
  language I came up with. FontForge may be configured with either or both
  of these. If configured with both then fontforge will make a guess at which
  to use based on the script file's extension ("py" means use the python
  interpreter, "ff" or "pe" means use the old interpreter)
  <UL>
    <LI>
      <A HREF="#Starting">Invoking a
      script</A><A HREF="scripting-tutorial.html"></A>
    <LI>
      <A HREF="python.html">Python scripting</A>
    <LI>
      <A HREF="scripting-tutorial.html">Native Scripting tutorial</A>
    <LI>
      <A HREF="#Language">Native Scripting language</A>
      <UL>
	<LI>
	  <A HREF="#variables">Built in variables</A>
	<LI>
	  <A HREF="#procedures">Built in procedures</A>
	<LI>
	  <A HREF="#Example">Examples</A>
      </UL>
    <LI>
      <A HREF="scripting.html#Execute">The Execute Script dialog</A>
    <LI>
      <A HREF="#menu">The Scripts menu</A>
  </UL>
  <H2>
    <A NAME="Starting">Invoking scripts</A>
  </H2>
  <P>
  If you start fontforge with a script on the command line it will not put
  up any windows and it will exit when the script is done. The script can be
  in a file, or just a string presented as an argument. You may need to specify
  which interpreter to use with the -lang argument.
  <BLOCKQUOTE>
    <PRE>$ fontforge -script scriptfile.pe {arguments}
$ fontforge -c "script-string" {arguments}
$ fontforge -lang={ff|py} -c "script-string"
</PRE>
  </BLOCKQUOTE>
  <P>
  FontForge can also be used as an interpreter to which the shell will
  automatically pass scripts. If you a mark your script files as executable<BR>
  <CODE>&nbsp; &nbsp; $ chmod +x scriptfile.pe</CODE><BR>
  and begin each one with the line<BR>
  <CODE>&nbsp; &nbsp; #!/usr/local/bin/fontforge</CODE><BR>
  (or wherever fontforge happens to reside on your system) then you can invoke
  the script just by typing<BR>
  <CODE>&nbsp; &nbsp; $ scriptfile.pe {fontnames}</CODE>
  <P>
  If you wish FontForge to read a script from stdin then you can use "-" as
  a "filename" for stdin. (If you build FontForge without X11 then fontforge
  will attempt to read a script file from <CODE>stdin</CODE> if none is given
  on the command line.)
  <P>
  You can also start a script from within FontForge with
  <CODE>File-&gt;Execute Script</CODE>, and you can use the Preference Dlg
  to define a set of frequently used scripts which can be invoked directly
  by menu.
  <P>
  The scripting language provides access to much of the functionality found
  in the font view's menus. It does not currently (and probably never will)
  provide access to everything. (If you find a lack let me know, I may put
  it in for you). It does not provide commands for building up a glyph out
  of splines, instead it allows you to do high level modifications to glyphs.
  <P>
  If you set the environment variable <CODE>FONTFORGE_VERBOSE</CODE> (it doesn't
  need a value, just needs to be set) then FontForge will print scripts to
  stdout as it executes them.
  <P>
  You may set the environment variable <CODE>FONTFORGE_LANGUAGE</CODE> to either
  "py" (for python) or "ff" or "pe" (for native scripting) as another way to
  determne what interpreter to use.
  <H2>
    <A HREF="python.html">Python scripting</A>
  </H2>
  <P>
  <A HREF="python.html">Is described elsewhere.</A>
  <H2>
    Scripting <A NAME="Language">Language</A>
  </H2>
  <P>
  The syntax is rather like a mixture of C and shell commands. Every file
  corresponds to a procedure. As in a shell script arguments passed to the
  file are identified as $1, $2, ... $n. $0 is the file name itself. $argc
  gives the number of arguments. $argv[&lt;expr&gt;] provides array access
  to the arguments.
  <P>
  Terms can be
  <UL>
    <LI>
      A variable name (like "$1" or "i" or "@fontvar" or "_global")<BR>
      The scope of the variable depends on the initial character of its name.
      <UL>
	<LI>
	  A '$' signifies that it is a built-in variable. The user cannot create any
	  new variables beginning with '$'. Some, but not all, of these may be assigned
	  to.
	<LI>
	  A '_' signifies that the variable is global, it is always available. You
	  can use these to store context across different script files (or to access
	  data within nested script files).
	<LI>
	  A '@' signifies that the variable is associated with the font. Any two scripts
	  looking at the same font will have access to the same variables.
	<LI>
	  A variable which begins with a letter is a local variable. It is only meaningful
	  within the current script file. Nested script files may have different variables
	  with the same names.
      </UL>
    <LI>
      an integer expressed in decimal, hex or octal
    <LI>
      a unicode code point (which has a prefix of "0u" or "0U" and is followed
      by a string of hex digits. This is only used by the select command.
    <LI>
      a real number (in "C" locale format -- "." as the decimal point character)
    <LI>
      A string which may be enclosed in either double or single quotes. String
      tokens are limited to 256 bytes. "\n" can be used to represent a newline
      character. (If you need longer strings use the concatenation operator).
    <LI>
      a procedure to call or file to invoke.
    <LI>
      an expression within parentheses
    <LI>
      a series of expressions (separated by commas) within brackets, as <CODE>[1,
      2, 3, 5, 8]</CODE>, used to create an array.
  </UL>
  <P>
  There are three different comments supported:
  <UL>
    <LI>
      Starting with a "#" character and proceeding to end of line
    <LI>
      Starting with "//" and proceeding to end of line
    <LI>
      Starting with "/*" and proceeding to "*/"
  </UL>
  <P>
  <A NAME="Expressions">Expressions</A> are similar to those in C, a few operators
  have been omitted, a few added from shell scripts. Operator precedence has
  been simplified slightly. So operators (and their precedences) are:
  <UL>
    <LI>
      unary operators (+, -, !, ~, ++ (prefix and postfix), --(prefix and postfix),
      () (procedure call), [] (array index), :h, :t, :r, :e<BR>
      Most of these are as expected in C, the last four are borrowed from shell
      scripts and are applied to strings
      <UL>
	<LI>
	  :h gives the head (directory) of a pathspec
	<LI>
	  :t gives the tail (filename) of a pathspec
	<LI>
	  :r gives the pathspec without the extension (if any)
	<LI>
	  :e gives the extension
      </UL>
    <LI>
      *, /, % (binary multiplicative operators)
    <LI>
      +, - (binary arithmetic operators)<BR>
      If the first operand of + is a string then + will be treated as concatenation
      rather than addition. If the second operand is a number it will be converted
      to a string (decimal representation) and then concatenated. If the first
      operand of + is an array then + will do array concatenation -- if the second
      argment is also an array the two will be concatenated ([1,2] + [3,4] yields
      [1,2,3,4], while [1,2] + 3 yields [1,2,3]). Otherwise these are the normal
      arithmetric operations.
    <LI>
      ==, !=, &gt;, &lt;, &gt;=, &lt;= (comparison operators, may be applied to
      either two integers or two strings)
    <LI>
      &amp;&amp;, &amp; (logical and, bitwise and. (logical and will do short circuit
      evaluation))
    <LI>
      ||, |, ^ (logical or, bitwise or, bitwise exclusive or (logical or will do
      short circuit evaluation))
    <LI>
      =, +=, -=, *=, /=, %= (assignment operators as in C. The += will act as
      concatenation if the first operand is a string.)
  </UL>
  <P>
  Note there is no comma operator, and no "?:" operator. The precedence of
  "and" and "or" has been simplified, as has that of the assignment operators.
  <P>
  Procedure calls may be applied either to a name token, or to a string. If
  the name or string is recognized as one of FontForge's internal procedures
  it will be executed, otherwise it will be assumed to be a filename containing
  another fontforge script file, this file will be invoked (since filenames
  can contain characters not legal in name tokens it is important to allow
  general strings to specify filenames). If the procedure name does not contain
  a directory then it is assumed to be in the same directory as the current
  script file.  As a convenience, it is not necessary to include the
  script's extension if it is either ".ff" or ".pe".  At most 25 arguments can be
  passed to a procedure.
  <P>
  Arrays are passed by reference, strings and integers are passed by value.
  <P>
  Variables may be created by assigning a value to them (only with the "="),
  so:<BR>
  <CODE>&nbsp; &nbsp; i=3</CODE><BR>
  could be used to define "i" as a variable. Variables are limited in scope
  to the current file, they will not be inherited by called procedures.
  <P>
  A statement may be
  <UL>
    <LI>
      an expression
    <LI>
      <CODE>if ( expression )<BR>
      &nbsp; &nbsp; statements<BR>
      {elseif ( expression )<BR>
      &nbsp; &nbsp; statements}<BR>
      [else<BR>
      &nbsp; &nbsp; statements]<BR>
      endif</CODE>
    <LI>
      <CODE>while ( expression )<BR>
      &nbsp; &nbsp; statements<BR>
      endloop</CODE>
    <LI>
      <CODE>foreach<BR>
      &nbsp; &nbsp; statements<BR>
      endloop</CODE>
    <LI>
      <CODE>break</CODE>
    <LI>
      <CODE>return [ expression ]</CODE>
    <LI>
      <CODE>shift</CODE>
  </UL>
  <P>
  As with C, non-zero expressions are defined to be true.<BR>
  A return statement may be followed by a return value (the expression) or
  a procedure may return nothing (void).<BR>
  The shift statement is stolen from shell scripts and shifts all arguments
  down by one. (argument 0, the name of the script file, remains unchanged.<BR>
  The foreach statement requires that there be a current font. It executes
  the statements once for each glyph in the selection. Within the statements
  only one glyph at a time will be selected. After execution the selection
  will be restored to what it was initially. (Caveat: Don't reencode the font
  within a foreach statement).<BR>
  Statements are terminated either by a new line (you can break up long lines
  with backslash newline) or a semicolon.
  <P>
  Trivial example:
  <BLOCKQUOTE>
    <PRE>i=0;	#semicolon is not needed here, but it's ok
while ( i&lt;3 )
   if ( i==1 /* pointless comment */ )
	Print( "Got to one" )	// Another comment
   endif
   ++i
endloop
</PRE>
  </BLOCKQUOTE>
  <P>
  FontForge maintains the concept of a "current font"-- almost all commands
  refer only to the current font (and require that there be a font). If you
  start a script with File-&gt;Execute Script, the font you were editing will
  be current, otherwise there will be no initial current font. The Open(),
  New() and Close() commands all change the current font. FontForge also maintains
  a list of all fonts that are currently open. This list is in no particular
  order. The list starts with $firstfont.
  <P>
  Similarly when working with cid keyed fonts, FontForge works in the "current
  sub font", and most commands refer to this font. The CIDChangeSubFont() command
  can alter that.
  <P>
  All builtin <A NAME="variables">variables</A> begin with "$", you may not
  create any variables that start with "$" yourself (though you may assign
  to (some) already existing ones)
  <UL>
    <LI>
      <CODE>$0 </CODE>the current script filename
    <LI>
      <CODE>$1 </CODE>the first argument to the script file
    <LI>
      <CODE>$2 </CODE>the second argument to the script file
    <LI>
      ...
    <LI>
      <CODE>$argc</CODE> the number of arguments passed to the script file (this
      will always be at least 1 as $0 is always present)
    <LI>
      <CODE>$argv </CODE>allows you to access the array of all the arguments
    <LI>
      <CODE>$curfont </CODE>the name of the filename in which the current font
      resides
    <LI>
      <CODE>$firstfont </CODE>the name of the filename of the font which is first
      on the font list (Can be used by Open()), if there are no fonts loaded this
      returns an empty string. This can be used to determine if any font at all
      is loaded into fontforge.
    <LI>
      <CODE>$nextfont </CODE>the name of the filename of the font which follows
      the current font on the list (or the empty string if the current font is
      the last one on the list)
    <LI>
      <CODE>$fontchanged</CODE> returns 1 if the current font has changed, 0 if
      it has not changed since it was read in (or saved).
    <LI>
      <CODE>$fontname</CODE> the name contained in the postscript FontName field
    <LI>
      <CODE>$familyname </CODE>the name contained in the postscript FamilyName
      field
    <LI>
      <CODE>$fullname </CODE>the name contained in the postscript FullName field
    <LI>
      <CODE>$fondname </CODE>if set this name indicates what FOND the current font
      should be put in under Generate Mac Family.
    <LI>
      <CODE>$weight </CODE>the name contained in the postscript Weight field
    <LI>
      <CODE>$copyright </CODE>the name contained in the postscript Notice field
    <LI>
      <CODE>$filename </CODE>the name of the file containing the font.
    <LI>
      <CODE>$fontversion</CODE> the string containing the font's version
    <LI>
      <CODE>$iscid </CODE>1 if the current font is a cid keyed font, 0 if not
    <LI>
      <CODE>$cidfontname </CODE>returns the fontname of the top-level cid-keyed
      font (or the empty string if there is none)<BR>
      Can be used to detect if this is a cid keyed font.
    <LI>
      <CODE>$cidfamilyname, $cidfullname, $cidweight, $cidcopyright </CODE>similar
      to above
    <LI>
      <CODE>$mmcount </CODE>returns 0 for non multiple master fonts, returns the
      number of instances in a multiple master font.
    <LI>
      <CODE>$italicangle </CODE>the value of the postscript italic angle field
    <LI>
      <CODE>$loadState</CODE> a bitmask of non-fatal errors encountered when loading
      the font.
    <LI>
      <CODE>$privateState </CODE>a bitmask of some errors in the PostScript Private
      dictionary (see the <A HREF="python.html#Font_privateState">python entry</A>
      for more info).
    <LI>
      <CODE>$curcid </CODE>returns the fontname of the current font
    <LI>
      <CODE>$firstcid </CODE>returns the fontname of the first font within this
      cid font
    <LI>
      <CODE>$nextcid </CODE>returns the fontname of the next font within this cid
      font (or the empty string if the current sub-font is the last)
    <LI>
      <CODE>$macstyle </CODE>returns the value of the macstyle field (a set of
      bits indicating whether the font is bold, italic, condensed, etc.)
    <LI>
      <CODE>$bitmaps </CODE>returns an array containing all bitmap pixelsizes generated
      for this font. (If the font database contains greymaps then they will be
      indicated in the array as
      <CODE>(&lt;BitmapDepth&gt;&lt;&lt;16)|&lt;PixelSize&gt;</CODE>)
    <LI>
      <CODE>$order </CODE>returns an integer containing either 2 (for truetype
      fonts) or 3 (for postscript fonts). This indicates whether the font uses
      quadratic or cubic splines.
    <LI>
      <CODE>$em</CODE> returns the number of em-units used by the font.
    <LI>
      <CODE>$ascent </CODE>returns the ascent of the font
    <LI>
      <CODE>$descent </CODE>returns the descent of the font.
    <LI>
      <CODE>$selection</CODE> returns an array containing one entry for each glyph
      in the current font indicating whether that glyph is selected or not
      (0=&gt;not, 1=&gt;selected)
    <LI>
      <CODE>$panose</CODE> returns an array containing the 10 panose values for
      the font.
    <LI>
      <CODE>$trace</CODE> if this is set to one then FontForge will trace each
      procedure call.
    <LI>
      <CODE>$version</CODE> returns a string containing the current version of
      fontforge. This should look something like "20050817".
    <LI>
      <CODE>$haspython</CODE> returns 1 if python scripting is available, 0 if
      it is not.
    <LI>
      <CODE>$</CODE>&lt;<A NAME="Preference">Preference</A> Item&gt; (for example
      <CODE>$AutoHint</CODE>) allows you to examine the value of that preference
      item (to set it use
      <CODE><A HREF="scripting-alpha.html#SetPref">SetPref</A></CODE>)
  </UL>
  <P>
  The following example will perform an action on all loaded fonts:
  <BLOCKQUOTE>
    <PRE>file = $firstfont
while ( file != "" )
   Open(file)
   /* Do Stuff */
   file = $nextfont
endloop
</PRE>
  </BLOCKQUOTE>
  <P>
  The built in <A NAME="procedures">procedures</A> are very similar to the
  menu items with the same names. Often the description here is sketchy, look
  at the menu item for more information.
  <UL>
    <LI>
      <A HREF="scripting-alpha.html">Built-in procedures in alphabetic order</A>
    <LI>
      <A HREF="#no-font">Built-in procedures that do not require a font</A>
    <LI>
      <A HREF="#file-menu">File menu</A>
    <LI>
      <A HREF="#files">File manipulation</A>
    <LI>
      <A HREF="#edit-menu">Edit menu</A>
    <LI>
      <A HREF="#select-menu">Select menu</A>
    <LI>
      <A HREF="#element-menu">Element menu</A>
    <LI>
      <A HREF="#font-info">Font information</A>
    <LI>
      <A HREF="#glyph-info">Glyph information</A>
    <LI>
      <A HREF="#ATT">Advanced Typography</A>
    <LI>
      <A HREF="#encoding-menu">Encoding menu</A>
    <LI>
      <A HREF="#hint-menu">Hint menu</A>
    <LI>
      <A HREF="#metrics-menu">Metrics menu</A>
    <LI>
      <A HREF="#MM">Multiple master</A>
    <LI>
      <A HREF="#CID">CID keyed fonts</A>
    <LI>
      <A HREF="#user">User interaction</A>
    <LI>
      <A HREF="#prefs">Preferences</A>
    <LI>
      <A HREF="#math">Math</A>
    <LI>
      <A HREF="#unicode">Unicode</A>
    <LI>
      <A HREF="#strings">String manipulation</A>
    <LI>
      <A HREF="#Character">Character manipulation</A>
    <LI>
      <A HREF="#arrays">Arrays</A>
    <LI>
      <A HREF="#misc">Miscellaneous</A>
    <LI>
      <A HREF="#Deprecated">Deprecated</A> Names
  </UL>
  <H3 ALIGN=Center>
    Built-in procedures in <A NAME="alpha">alphabetic</A> order
  </H3>
  <P ALIGN=Center>
  - <A HREF="scripting-alpha.html#A">A</A> -
  <A HREF="scripting-alpha.html#B">B</A> -
  <A HREF="scripting-alpha.html#C">C</A> -
  <A HREF="scripting-alpha.html#D">D</A> -
  <A HREF="scripting-alpha.html#E">E</A> -
  <A HREF="scripting-alpha.html#F">F</A> -
  <A HREF="scripting-alpha.html#G">G</A> -
  <A HREF="scripting-alpha.html#H">H</A> - <A HREF="scripting-alpha.html#I">I
  </A>- <A HREF="scripting-alpha.html#J">J </A>-
  <A HREF="scripting-alpha.html#K">K</A> -
  <A HREF="scripting-alpha.html#L">L</A> -
  <A HREF="scripting-alpha.html#M">M</A> -
  <A HREF="scripting-alpha.html#N">N</A> -
  <A HREF="scripting-alpha.html#O">O</A> -
  <A HREF="scripting-alpha.html#P">P</A> -
  <A HREF="scripting-alpha.html#Q">Q</A> -
  <A HREF="scripting-alpha.html#R">R</A> -
  <A HREF="scripting-alpha.html#S">S</A> - <A HREF="scripting-alpha.html#T">T
  </A>- <A HREF="scripting-alpha.html#U">U </A>-
  <A HREF="scripting-alpha.html#V">V </A>-
  <A HREF="scripting-alpha.html#W">W</A> - <A HREF="scripting-alpha.html#X">X
  </A>- <A HREF="scripting-alpha.html#Y">Y</A> -
  <A HREF="scripting-alpha.html#Z">Z </A>-
  <H3 ALIGN=Center>
    Built-in procedures that do not require a <A NAME="no-font">loaded font</A>
  </H3>
  <UL>
    <LI>
      <A HREF="scripting-alpha.html#Array">Array(size)</A>
    <LI>
      <A HREF="scripting-alpha.html#AskUser">AskUser(question[,default-answer])</A>
    <LI>
      <A HREF="scripting-alpha.html#ATan2">ATan2(val1,val2)</A>
    <LI>
      <A HREF="scripting-alpha.html#Ceil">Ceil(real)</A>
    <LI>
      <A HREF="scripting-alpha.html#Chr">Chr(int)</A>
    <LI>
      <A HREF="scripting-alpha.html#Cos">Cos(val)</A>
    <LI>
      <A HREF="scripting-alpha.html#Floor">Floor(real)</A>
    <LI>
      <A HREF="scripting-alpha.html#Error">Error(str)</A>
    <LI>
      <A HREF="scripting-alpha.html#Exp">Exp(val)</A>
    <LI>
      <A HREF="scripting-alpha.html#DefaultOtherSubrs">DefaultOtherSubrs()</A>
    <LI>
      <A HREF="scripting-alpha.html#FileAccess">FileAccess(filename[,prot])</A>
    <LI>
      <A HREF="scripting-alpha.html#FontsInFile">FontsInFile(filename)</A>
    <LI>
      <A HREF="scripting-alpha.html#GetEnv">GetEnv(str)</A>
    <LI>
      <A HREF="scripting-alpha.html#GetPref">GetPref(str)</A>
    <LI>
      <A HREF="scripting-alpha.html#Int">Int(real)</A>
    <LI>
      <A HREF="scripting-alpha.html#IsAlNum">IsAlNum(val)</A>
    <LI>
      <A HREF="scripting-alpha.html#IsAlpha">IsAlpha(val)</A>
    <LI>
      <A HREF="scripting-alpha.html#IsDigit">IsDigit(val)</A>
    <LI>
      <A HREF="scripting-alpha.html#IsFinite">IsFinite(real)</A>
    <LI>
      <A HREF="scripting-alpha.html#IsHexDigit">IsHexDigit(val)</A>
    <LI>
      <A HREF="scripting-alpha.html#IsLower">IsLower(val)</A>
    <LI>
      <A HREF="scripting-alpha.html#IsNan">IsNan(real)</A>
    <LI>
      <A HREF="scripting-alpha.html#IsSpace">IsSpace(val)</A>
    <LI>
      <A HREF="scripting-alpha.html#IsUpper">IsUpper(val)</A>
    <LI>
      <A HREF="scripting-alpha.html#LoadEncodingFile">LoadEncodingFile(filename,[encname])</A>
    <LI>
      <A HREF="scripting-alpha.html#LoadNamelist">LoadNamelist(filename)</A>
    <LI>
      <A HREF="scripting-alpha.html#LoadNamelistDir">LoadNamelistDir([directory-name])</A>
    <LI>
      <A HREF="scripting-alpha.html#LoadPlugin">LoadPlugin(filename)</A>
    <LI>
      <A HREF="scripting-alpha.html#LoadPluginDir">LoadPluginDir([directory-name])</A>
    <LI>
      <A HREF="scripting-alpha.html#LoadPrefs">LoadPrefs()</A>
    <LI>
      <A HREF="scripting-alpha.html#LoadStringFromFile">LoadStringFromFile("filename")</A>
    <LI>
      <A HREF="scripting-alpha.html#Log">Log(val)</A>
    <LI>
      <A HREF="scripting-alpha.html#NameFromUnicode">NameFromUnicode(uni[,namelist])</A>
    <LI>
      <A HREF="scripting-alpha.html#New">New()</A>
    <LI>
      <A HREF="scripting-alpha.html#Open">Open(filename[,flags])</A>
    <LI>
      <A HREF="scripting-alpha.html#Ord">Ord(string[,pos])</A>
    <LI>
      <A HREF="scripting-alpha.html#PostNotice">PostNotice(str)</A>
    <LI>
      <A HREF="scripting-alpha.html#Pow">Pow(val1,val2)</A>
    <LI>
      <A HREF="scripting-alpha.html#PreloadCidmap">PreloadCidmap(filename,registry,ordering,supplement)</A>
    <LI>
      <A HREF="scripting-alpha.html#Print">Print(arg1,arg2,arg3,...)</A>
    <LI>
      <A HREF="scripting-alpha.html#Rand">Rand()</A>
    <LI>
      <A HREF="scripting-alpha.html#ReadOtherSubrsFile">ReadOtherSubrsFile(filename)</A>
    <LI>
      <A HREF="scripting-alpha.html#Real">Real(int)</A>
    <LI>
      <A HREF="scripting-alpha.html#Round">Round(real)</A>
    <LI>
      <A HREF="scripting-alpha.html#SavePrefs">SavePrefs()</A>
    <LI>
      <A HREF="scripting-alpha.html#SetPref">SetPref(str,val[,val2])</A>
    <LI>
      <A HREF="scripting-alpha.html#SizeOf">SizeOf(arr)</A>
    <LI>
      <A HREF="scripting-alpha.html#Sin">Sin(val)</A>
    <LI>
      <A HREF="scripting-alpha.html#Sqrt">Sqrt(val)</A>
    <LI>
      <A HREF="scripting-alpha.html#Strcasestr">Strcasestr(haystack,needle)</A>
    <LI>
      <A HREF="scripting-alpha.html#Strcasecmp">Strcasecmp(str1,str2)</A>
    <LI>
      <A HREF="scripting-alpha.html#Strftime">Strftime(format[,isgmt[,locale]])</A>
    <LI>
      <A HREF="scripting-alpha.html#StrJoin">StrJoin(array,delimiter)</A>
    <LI>
      <A HREF="scripting-alpha.html#Strlen">Strlen(str)</A>
    <LI>
      <A HREF="scripting-alpha.html#Strrstr">Strrstr(haystack,needle)</A>
    <LI>
      <A HREF="scripting-alpha.html#Strskipint">Strskipint(str[,base])</A>
    <LI>
      <A HREF="scripting-alpha.html#StrSplit">StrSplit(str,delimiter[,max-count])</A>
    <LI>
      <A HREF="scripting-alpha.html#Strstr">Strstr(haystack,needle)</A>
    <LI>
      <A HREF="scripting-alpha.html#Strsub">Strsub(str,start[,end])</A>
    <LI>
      <A HREF="scripting-alpha.html#Strtod">Strtod(str)</A>
    <LI>
      <A HREF="scripting-alpha.html#Strtol">Strtol(str[,base])</A>
    <LI>
      <A HREF="scripting-alpha.html#Tan">Tan(val)</A>
    <LI>
      <A HREF="scripting-alpha.html#ToLower">ToLower(val)</A>
    <LI>
      <A HREF="scripting-alpha.html#ToMirror">ToMirror(val)</A>
    <LI>
      <A HREF="scripting-alpha.html#ToString">ToString(arg)</A>
    <LI>
      <A HREF="scripting-alpha.html#ToUpper">ToUpper(val)</A>
    <LI>
      <A HREF="scripting-alpha.html#TypeOf">TypeOf(any)</A>
    <LI>
      <A HREF="scripting-alpha.html#UCodePoint">UCodePoint(int)</A>
    <LI>
      <A HREF="scripting-alpha.html#UnicodeFromName">UnicodeFromName(name)</A>
    <LI>
      <A HREF="scripting-alpha.html#Ucs4">Ucs4(str)</A>
    <LI>
      <A HREF="scripting-alpha.html#Utf8">Utf8(int)</A>
    <LI>
      <A HREF="scripting-alpha.html#WriteStringToFile">WriteStringToFile("string","Filename"[,append])</A>
  </UL>
  <H3 ALIGN=Center>
    Built-in procedures that act like the <A NAME="file-menu">File Menu</A>
  </H3>
  <UL>
    <LI>
      <A HREF="scripting-alpha.html#Close">Close()</A>
    <LI>
      <A HREF="scripting-alpha.html#ControlAfmLigatureOutput"><STRIKE>ControlAfmLigatureOutput(script,lang,ligature-tag-list)</STRIKE></A>
    <LI>
      <A HREF="scripting-alpha.html#Export">Export(format[,bitmap-size])</A>
    <LI>
      <A HREF="scripting-alpha.html#FontsInFile">FontsInFile(filename)</A>
    <LI>
      <A HREF="scripting-alpha.html#Generate">Generate(filename[,bitmaptype[,fmflags[,res[,mult-sfd-file[,namelist-name]]]]])</A>
    <LI>
      <A HREF="scripting-alpha.html#GenerateFamily">GenerateFamily(filename,bitmaptype,fmflags,array-of-font-filenames)</A>
    <LI>
      <A HREF="scripting-alpha.html#Import">Import(filename[,toback[,flags]])</A>
    <LI>
      <A HREF="scripting-alpha.html#MergeKern">MergeKern(filename)</A> deprecated
    <LI>
      <A HREF="scripting-alpha.html#MergeFeature">MergeFeature(filename)</A>
    <LI>
      <A HREF="scripting-alpha.html#New">New()</A>
    <LI>
      <A HREF="scripting-alpha.html#Open">Open(filename[,flags])</A>
    <LI>
      <A HREF="scripting-alpha.html#PrintFont">PrintFont(type[,pointsize[,sample-text/filename[,output-file]]])</A>
    <LI>
      <A HREF="scripting-alpha.html#PrintSetup">PrintSetup(type,[printer[,width,height]])</A>
    <LI>
      <A HREF="scripting-alpha.html#Quit">Quit(status)</A>
    <LI>
      <A HREF="scripting-alpha.html#Revert">Revert()</A>
    <LI>
      <A HREF="scripting-alpha.html#RevertToBackup">RevertToBackup()</A>
    <LI>
      <A HREF="scripting-alpha.html#Save">Save([filename])</A>
  </UL>
  <H3 ALIGN=Center>
    <A NAME="files">File Manipulation</A>
  </H3>
  <UL>
    <LI>
      <A HREF="scripting-alpha.html#FileAccess">FileAccess(filename[,prot])</A>
    <LI>
      <A HREF="scripting-alpha.html#FontImage">FontImage(filename,array[,width[,height]])</A>
    <LI>
      <A HREF="scripting-alpha.html#LoadStringFromFile">LoadStringFromFile("filename")</A>
    <LI>
      <A HREF="scripting-alpha.html#WriteStringToFile">WriteStringToFile("string","Filename"[,append])</A>
  </UL>
  <H3 ALIGN=Center>
    Built-in procedures that act like the <A NAME="edit-menu">Edit Menu</A>
  </H3>
  <UL>
    <LI>
      <A HREF="scripting-alpha.html#Clear">Clear</A>
    <LI>
      <A HREF="scripting-alpha.html#ClearBackground">ClearBackground</A>
    <LI>
      <A HREF="scripting-alpha.html#Copy">Copy</A>
    <LI>
      <A HREF="scripting-alpha.html#CopyAnchors">CopyAnchors</A>
    <LI>
      <A HREF="scripting-alpha.html#CopyFgToBg">CopyFgToBg</A>
    <LI>
      <A HREF="scripting-alpha.html#CopyGlyphFeatures"><STRIKE>CopyGlyphFeatures(arg,...)</STRIKE></A>
    <LI>
      <A HREF="scripting-alpha.html#CopyLBearing">CopyLBearing</A>
    <LI>
      <A HREF="scripting-alpha.html#CopyRBearing">CopyRBearing</A>
    <LI>
      <A HREF="scripting-alpha.html#CopyReference">CopyReference</A>
    <LI>
      <A HREF="scripting-alpha.html#CopyUnlinked">CopyUnlinked</A>
    <LI>
      <A HREF="scripting-alpha.html#CopyVWidth">CopyVWidth</A>
    <LI>
      <A HREF="scripting-alpha.html#CopyWidth">CopyWidth</A>
    <LI>
      <A HREF="scripting-alpha.html#Cut">Cut</A>
    <LI>
      <A HREF="scripting-alpha.html#Join">Join([fudge])</A>
    <LI>
      <A HREF="scripting-alpha.html#Paste">Paste</A>
    <LI>
      <A HREF="scripting-alpha.html#Paste">PasteInto</A>
    <LI>
      <A HREF="scripting-alpha.html#PasteWithOffset">PasteWithOffset(xoff,yoff)</A>
    <LI>
      <A HREF="scripting-alpha.html#ReplaceWithReference">ReplaceWithReference([fudge])</A>
    <LI>
      <A HREF="scripting-alpha.html#SameGlyphAs">SameGlyphAs</A>
    <LI>
      <A HREF="scripting-alpha.html#UnlinkReference">UnlinkReference</A>
  </UL>
  <H3 ALIGN=Center>
    Built-in procedures that act like the <A NAME="select-menu">Select Menu</A>
  </H3>
  <UL>
    <LI>
      <A HREF="scripting-alpha.html#Select">Select(arg1, arg2, ...)</A>
    <LI>
      <A HREF="scripting-alpha.html#SelectAll">SelectAll</A>
    <LI>
      <A HREF="scripting-alpha.html#SelectAllInstancesOf">SelectAllInstancesOf</A>(name1[,...])
    <LI>
      <A HREF="scripting-alpha.html#SelectBitmap">SelectBitmap(size)</A>
    <LI>
      <A HREF="scripting-alpha.html#SelectByATT"><STRIKE>SelectByATT(type,tags,contents,search-type)</STRIKE></A>
    <LI>
      <A HREF="scripting-alpha.html#SelectByPosSub">SelectByPosSub(lookup-subtable-name,search_type)</A>
    <LI>
      <A HREF="scripting-alpha.html#SelectChanged">SelectChanged([merge])</A>
    <LI>
      <A HREF="scripting-alpha.html#SelectFewer">SelectFewer(arg1, arg2, ...)</A>
    <LI>
      <A HREF="scripting-alpha.html#SelectFewerSingletons">SelectFewerSingletons(arg1,
      ...)</A>
    <LI>
      <A HREF="scripting-alpha.html#SelectGlyphsBoth">SelectGlyphsBoth()</A>
    <LI>
      <A HREF="scripting-alpha.html#SelectGlyphsReferences">SelectGlyphsReferences()</A>
    <LI>
      <A HREF="scripting-alpha.html#SelectGlyphsSplines">SelectGlyphsSplines()</A>
    <LI>
      <A HREF="scripting-alpha.html#SelectHintingNeeded">SelectHintingNeeded([merge])</A>
    <LI>
      <A HREF="scripting-alpha.html#SelectIf">SelectIf(arg1,arg2, ...)</A>
    <LI>
      <A HREF="scripting-alpha.html#SelectInvert">SelectInvert()</A>
    <LI>
      <A HREF="scripting-alpha.html#SelectMore">SelectMore(arg1, arg2, ...)</A>
    <LI>
      <A HREF="scripting-alpha.html#SelectMoreIf">SelectMoreIf(arg1, arg2, ...)</A>
    <LI>
      <A HREF="scripting-alpha.html#SelectMoreSingletons">SelectMoreSingletons(arg1,
      ...)</A>
    <LI>
      <A HREF="scripting-alpha.html#SelectMoreSingletonsIf">SelectMoreSingletonsIf(arg1,
      ...)</A>
    <LI>
      <A HREF="scripting-alpha.html#SelectNone">SelectNone()</A>
    <LI>
      <A HREF="scripting-alpha.html#SelectSingletons">SelectSingletons(arg1, ...)
      </A>
    <LI>
      <A HREF="scripting-alpha.html#SelectSingletonsIf">SelectSingletonsIf(arg1,
      ...) </A>
    <LI>
      <A HREF="scripting-alpha.html#SelectWorthOutputting">SelectWorthOutputting()</A>
  </UL>
  <H3 ALIGN=Center>
    Built-in procedures that act like the <A NAME="element-menu">Element Menu</A>
  </H3>
  <UL>
    <LI>
      <A HREF="scripting-alpha.html#AddAccent">AddAccent(accent[,pos])</A>
    <LI>
      <A HREF="scripting-alpha.html#AddExtrema">AddExtrema([all])</A>
    <LI>
      <A HREF="scripting-alpha.html#ApplySubstitution">ApplySubstitution(script,lang,tag)</A>
    <LI>
      <A HREF="scripting-alpha.html#AutoTrace">AutoTrace()</A>
    <LI>
      <A HREF="scripting-alpha.html#BitmapsAvail">BitmapsAvail(sizes[,rasterized])</A>
    <LI>
      <A HREF="scripting-alpha.html#BitmapsRegen">BitmapsRegen(sizes)</A>
    <LI>
      <A HREF="scripting-alpha.html#BuildAccented">BuildAccented()</A>
    <LI>
      <A HREF="scripting-alpha.html#BuildComposite">BuildComposite()</A>
    <LI>
      <A HREF="scripting-alpha.html#BuildDuplicate">BuildDuplicate()</A>
    <LI>
      <A HREF="scripting-alpha.html#CanonicalContours">CanonicalContours</A>()
    <LI>
      <A HREF="scripting-alpha.html#CanonicalStart">CanonicalStart</A>()
    <LI>
      <A HREF="scripting-alpha.html#ChangeWeight">ChangeWeight</A>(em-units)
    <LI>
      <A HREF="scripting-alpha.html#CompareFonts">CompareFonts(other-font-filename,output-filename,flags)</A>
    <LI>
      <A HREF="scripting-alpha.html#CompareGlyphs">CompareGlyphs([pt_err[,spline_err[,pixel_off_frac[,bb_err[,compare_hints[,report_diffs_as_errors]]]]]])</A>
    <LI>
      <A HREF="scripting-alpha.html#CorrectDirection">CorrectDirection([unlinkrefs])</A>
    <LI>
      <A HREF="scripting-alpha.html#DefaultRoundToGrid">DefaultRoundToGrid()</A>
    <LI>
      <A HREF="scripting-alpha.html#DefaultUseMyMetrics">DefaultUseMyMetrics()</A>
    <LI>
      <A HREF="scripting-alpha.html#ExpandStroke">ExpandStroke(width)</A>
    <LI>
      <A HREF="scripting-alpha.html#FindIntersections">FindIntersections()</A>
    <LI>
      <A HREF="scripting-alpha.html#HFlip">HFlip([about-x])</A>
    <LI>
      <A HREF="scripting-alpha.html#Inline">Inline(width,gap)</A>
    <LI>
      <A HREF="scripting-alpha.html#InterpolateFonts">InterpolateFonts(percentage,other-font-name[,flags])</A>
    <LI>
      <A HREF="scripting-alpha.html#Italic">Italic([angle[,[xscale[,flags[,serif[,bearings[,stems[,counters[,lcstems[,lccounters]]]]]]]]]])</A>
    <LI>
      <A HREF="scripting-alpha.html#MergeFonts">MergeFonts(other-font-name[,flags])</A>
    <LI>
      <A HREF="scripting-alpha.html#Move">Move(delta-x,delta-y)</A>
    <LI>
      <A HREF="scripting-alpha.html#MoveReference">MoveReference(delta-x,delta-y,[refname/ref-unicode]+)</A>
    <LI>
      <A HREF="scripting-alpha.html#NearlyHvCps">NearlyHvCps([error[,err-denom]])</A>
    <LI>
      <A HREF="scripting-alpha.html#NearlyHvLines">NearlyHvLines([error[,err-denom]])</A>
    <LI>
      <A HREF="scripting-alpha.html#NearlyLines">NearlyLines(error)</A>
    <LI>
      <A HREF="scripting-alpha.html#NonLinearTransform">NonLinearTransform(x-expression,y-expression)</A>
    <LI>
      <A HREF="scripting-alpha.html#Outline">Outline(width)</A>
    <LI>
      <A HREF="scripting-alpha.html#OverlapIntersect">OverlapIntersect()</A>
    <LI>
      <A HREF="scripting-alpha.html#PositionReference">PositionReference(x,y,[refname/ref-unicode]+)</A>
    <LI>
      <A HREF="scripting-alpha.html#RemoveOverlap">RemoveOverlap()</A>
    <LI>
      <A HREF="scripting-alpha.html#Rotate">Rotate(angle[,ox,oy])</A>
    <LI>
      <A HREF="scripting-alpha.html#RoundToCluster">RoundToCluster([within[,max]])</A>
    <LI>
      <A HREF="scripting-alpha.html#RoundToInt">RoundToInt([factor])</A>
    <LI>
      <A HREF="scripting-alpha.html#Scale">Scale(factor[,yfactor][,ox,oy])</A>
    <LI>
      <A HREF="scripting-alpha.html#ScaleToEm">ScaleToEm(em-size)</A>
    <LI>
      <A HREF="scripting-alpha.html#Shadow">Shadow(angle,outline-width,shadow-width)</A>
    <LI>
      <A HREF="scripting-alpha.html#Simplify">Simplify()</A>
    <LI>
      <A HREF="scripting-alpha.html#Skew">Skew(angle[,ox,oy])</A>
    <LI>
      <A HREF="scripting-alpha.html#SmallCaps">SmallCaps([v-scale[,h-scale[,stemw-scale[,stemh-scale]]]])</A>
    <LI>
      <A HREF="scripting-alpha.html#Transform">Transform(t1,t2,t3,t4,t5,t6)</A>
    <LI>
      <A HREF="scripting-alpha.html#VFlip">VFlip([about-y])</A>
    <LI>
      <A HREF="scripting-alpha.html#Wireframe">Wireframe(angle,outline-width,shadow-width)</A>
  </UL>
  <H3 ALIGN=Center>
    <A NAME="font-info">Font Info</A>
  </H3>
  <UL>
    <LI>
      <A HREF="scripting-alpha.html#AddSizeFeature">AddSizeFeature(default-size[,range-bottom,range-top,style-id,array-of-lang-names])</A>
    <LI>
      <A HREF="scripting-alpha.html#ChangePrivateEntry">ChangePrivateEntry(key,val)</A>
    <LI>
      <A HREF="scripting-alpha.html#ClearPrivateEntry">ClearPrivateEntry(key)</A>
    <LI>
      <A HREF="scripting-alpha.html#GetFontBoundingBox">GetFontBoundingBox()</A>
    <LI>
      <A HREF="scripting-alpha.html#GetMaxpValue">GetMaxpValue(field-name)</A>
    <LI>
      <A HREF="scripting-alpha.html#GetOS2Value">GetOS2Value(field-name)</A>
    <LI>
      <A HREF="scripting-alpha.html#GetPrivateEntry">GetPrivateEntry(key)</A>
    <LI>
      <A HREF="scripting-alpha.html#GetTeXParam">GetTeXParam(index)</A>
    <LI>
      <A HREF="scripting-alpha.html#GetTTFName">GetTTFName(lang,nameid)</A>
    <LI>
      <A HREF="scripting-alpha.html#HasPrivateEntry">HasPrivateEntry(key)</A>
    <LI>
      <A HREF="scripting-alpha.html#ScaleToEm">ScaleToEm(em-size)</A>
    <LI>
      <A HREF="scripting-alpha.html#SetFondName">SetFondName(fondname)</A>
    <LI>
      <A HREF="scripting-alpha.html#SetFontHasVerticalMetrics">SetFontHasVerticalMetrics(flag)</A>
    <LI>
      <A HREF="scripting-alpha.html#SetFontNames">SetFontNames(fontname[,family[,fullname[,weight[,copyright-notice[,fontversion]]]]])</A>
    <LI>
      <A HREF="scripting-alpha.html#SetFontOrder">SetFontOrder(order)</A>
    <LI>
      <A HREF="scripting-alpha.html#SetGasp">SetGasp([ppem,flag[,ppem2,flag[,...]]])</A>
    <LI>
      <A HREF="scripting-alpha.html#SetItalicAngle">SetItalicAngle(angle[,denom])</A>
    <LI>
      <A HREF="scripting-alpha.html#SetMacStyle">SetMacStyle(val)</A>
    <LI>
      <A HREF="scripting-alpha.html#SetMaxpValue">SetMaxpValue(field-name,value)</A>
    <LI>
      <A HREF="scripting-alpha.html#SetOS2Value">SetOS2Value(field-name,field-value)</A>
    <LI>
      <A HREF="scripting-alpha.html#SetPanose">SetPanose(array)
      SetPanose(index,value)</A>
    <LI>
      <A HREF="scripting-alpha.html#SetTeXParams">SetTeXParams(type,design-size,slant,space,stretch,shrink,xheight,quad,extraspace[...])</A>
    <LI>
      <A HREF="scripting-alpha.html#SetTTFName">SetTTFName(lang,nameid,utf8-string)</A>
    <LI>
      <A HREF="scripting-alpha.html#SetUniqueID">SetUniqueID(value)</A>
    <LI>
      Some items (such as the font name) may be retrieved via built-in variables.
  </UL>
  <H3 ALIGN=Center>
    <A NAME="glyph-info">Glyph Info</A>
  </H3>
  <UL>
    <LI>
      <A HREF="scripting-alpha.html#DrawsSomething">DrawsSomething([arg])</A>
    <LI>
      <A HREF="scripting-alpha.html#GetPosSub">GetPosSub(lookup-subtable-name)</A>
    <LI>
      <A HREF="scripting-alpha.html#GlyphInfo">GlyphInfo(str)</A>
    <LI>
      <A HREF="scripting-alpha.html#SetGlyphColor">SetGlyphColor(color)</A>
    <LI>
      <A HREF="scripting-alpha.html#SetGlyphComment">SetGlyphComment(comment)</A>
    <LI>
      <A HREF="scripting-alpha.html#SetGlyphChanged">SetGlyphChanged(flag)</A>
    <LI>
      <A HREF="scripting-alpha.html#SetGlyphClass">SetGlyphClass(class-name)</A>
    <LI>
      <A HREF="scripting-alpha.html#SetGlyphName">SetGlyphName(name[,set-from-name-flag])</A>
    <LI>
      <A HREF="scripting-alpha.html#SetUnicodeValue">SetUnicodeValue(uni[,set-from-value-flag])</A>
    <LI>
      <A HREF="scripting-alpha.html#SetGlyphTeX">SetGlyphTeX(height,depth[,subpos,suppos])</A>
    <LI>
      <A HREF="scripting-alpha.html#WorthOutputting">WorthOutputting([arg])</A>
  </UL>
  <H3 ALIGN=Center>
    Built-in procedures that handle <A NAME="ATT">Advanced Typography</A>
  </H3>
  <UL>
    <LI>
      <A HREF="scripting-alpha.html#AddAnchorClass">AddAnchorClass(name,type,script-lang,tag,flags,merge-with)</A>
    <LI>
      <A HREF="scripting-alpha.html#AddAnchorPoint">AddAnchorPoint(name,type,x,y[,lig-index])</A>
    <LI>
      <A HREF="scripting-alpha.html#AddLookup">AddLookup(new-lookup-name,type,flags,feature-script-lang-array[,after-lookup-name)</A>
    <LI>
      <A HREF="scripting-alpha.html#AddLookupSubtable">AddLookupSubtable(lookup-name,new-subtable-name[,after-subtable-name])</A>
    <LI>
      <A HREF="scripting-alpha.html#AddPosSub">AddPosSub(subtable-name,variant(s))<BR>
      AddPosSub(subtable-name,dx,dy,dadv_x,dadv_y)<BR>
      AddPosSub(subtable-name,other-glyph-name,dx1,dy1,dadv_x1,dadv_y1,dx2,dy2,dadv_x2,dadv_y2)</A>
    <LI>
      <A HREF="scripting-alpha.html#AddSizeFeature">AddSizeFeature(default-size[,range-bottom,range-top,style-id,array-of-lang-names])</A>
    <LI>
      <A HREF="scripting-alpha.html#AddATT"><STRIKE>AddATT(type,script-lang,tag,flags,variant)</STRIKE></A>
    <LI>
      <A HREF="scripting-alpha.html#ApplySubstitution">ApplySubstitution(script,lang,tag)</A>
    <LI>
      <A HREF="scripting-alpha.html#CheckForAnchorClass">CheckForAnchorClass(name)</A>
    <LI>
      <A HREF="scripting-alpha.html#DefaultATT"><STRIKE>DefaultATT(tag)</STRIKE></A>
    <LI>
      <A HREF="scripting-alpha.html#GetAnchorPoints">GetAnchorPoints</A>
    <LI>
      <A HREF="scripting-alpha.html#GetLookupInfo">GetLookupInfo(lookup-name)</A>
    <LI>
      <A HREF="scripting-alpha.html#GetLookups">GetLookups(table-name)</A>
    <LI>
      <A HREF="scripting-alpha.html#GetLookupSubtable">GetLookupSubtables(lookup-name)</A>
    <LI>
      <A HREF="scripting-alpha.html#GetLookupOfSubtable">GetLookupOfSubtable(subtable-name)</A>
    <LI>
      <A HREF="scripting-alpha.html#GetPosSub">GetPosSub(lookup-subtable-name)</A>
    <LI>
      <A HREF="scripting-alpha.html#GetSubtableOfAnchor">GetSubtableOfAnchor(anchor-class-name)</A>
    <LI>
      <A HREF="scripting-alpha.html#GenerateFeatureFile">GenerateFeatureFile(filename[,lookup-name])</A>
    <LI>
      <A HREF="scripting-alpha.html#HasPreservedTable">HasPreservedTable(tag)</A>
    <LI>
      <A HREF="scripting-alpha.html#LoadTableFromFile">LoadTableFromFile(tag,filename)</A>
    <LI>
      <A HREF="scripting-alpha.html#LookupStoreLigatureInAfm">LookupStoreLigatureInAfm(lookup-name,store-it)</A>
    <LI>
      <A HREF="scripting-alpha.html#LookupSetFeatureList">LookupSetFeatureList(lookup-name,feature-script-lang-array)</A>
    <LI>
      <A HREF="scripting-alpha.html#MergeLookups">MergeLookups(lookup-name1,lookup-name2)</A>
    <LI>
      <A HREF="scripting-alpha.html#MergeLookupSubtables">MergeLookupSubtables(subtable-name1,subtable-name2)</A>
    <LI>
      <A HREF="scripting-alpha.html#RemoveATT"><STRIKE>RemoveATT(type,script-lang,tag)</STRIKE></A>
    <LI>
      <A HREF="scripting-alpha.html#RemoveAnchorClass">RemoveAnchorClass(name)</A>
    <LI>
      <A HREF="scripting-alpha.html#RemoveLookup">RemoveLookup(lookup-name)</A>
    <LI>
      <A HREF="scripting-alpha.html#RemoveLookupSubtable">RemoveLookupSubtable(subtable-name)</A>
    <LI>
      <A HREF="scripting-alpha.html#RemovePosSub">RemovePosSub(subtable-name)</A>
    <LI>
      <A HREF="scripting-alpha.html#RemovePreservedTable">RemovePreservedTable(tag)</A>
    <LI>
      <A HREF="scripting-alpha.html#SaveTableToFile">SaveTableToFile(tag,filename)</A>
  </UL>
  <H3 ALIGN=Center>
    Built-in procedures that act like the <A NAME="encoding-menu">Encoding Menu</A>
  </H3>
  <UL>
    <LI>
      <A HREF="scripting-alpha.html#CharCnt">CharCnt()</A>
    <LI>
      <A HREF="scripting-alpha.html#DetachGlyphs">DetachGlyphs</A>
    <LI>
      <A HREF="scripting-alpha.html#DetachAndRemoveGlyphs">DetachAndRemoveGlyphs</A>
    <LI>
      <A HREF="scripting-alpha.html#LoadEncodingFile">LoadEncodingFile(filename,[encname])</A>
    <LI>
      <A HREF="scripting-alpha.html#MultipleEncodingsToReferences">MultipleEncodingsToReferences()</A>
    <LI>
      <A HREF="scripting-alpha.html#Reencode">Reencode(encoding-name[,force])</A>
    <LI>
      <A HREF="scripting-alpha.html#RemoveDetachedGlyphs">RemoveDetachedGlyphs</A>()
    <LI>
      <A HREF="scripting-alpha.html#RenameGlyphs">RenameGlyphs(namelist-name)</A>
    <LI>
      <A HREF="scripting-alpha.html#SameGlyphAs">SameGlyphAs</A>
    <LI>
      <A HREF="scripting-alpha.html#SetCharCnt">SetCharCnt(cnt)</A>
  </UL>
  <H3 ALIGN=Center>
    Built-in procedures that act like the <A NAME="hint-menu">Hint Menu</A>
  </H3>
  <UL>
    <LI>
      <A HREF="scripting-alpha.html#AddDHint">AddDHint(x1,y1,x2,y2,unit.x,unit.y)</A>
    <LI>
      <A HREF="scripting-alpha.html#AddHHint">AddHHint(start,width)</A>
    <LI>
      <A HREF="scripting-alpha.html#AddInstrs">AddInstrs(thingamy,replace,instrs)</A>
    <LI>
      <A HREF="scripting-alpha.html#AddVHint">AddVHint(start,width)</A>
    <LI>
      <A HREF="scripting-alpha.html#AutoCounter">AutoCounter()</A>
    <LI>
      <A HREF="scripting-alpha.html#AutoHint">AutoHint()</A>
    <LI>
      <A HREF="scripting-alpha.html#AutoInstr">AutoInstr()</A>
    <LI>
      <A HREF="scripting-alpha.html#ChangePrivateEntry">ChangePrivateEntry(key,val)</A>
    <LI>
      <A HREF="scripting-alpha.html#ClearGlyphCounterMasks">ClearGlyphCounterMasks()</A>
    <LI>
      <A HREF="scripting-alpha.html#ClearHints">ClearHints()</A>
    <LI>
      <A HREF="scripting-alpha.html#ClearInstrs">ClearInstrs()</A>
    <LI>
      <A HREF="scripting-alpha.html#ClearPrivateEntry">ClearPrivateEntry(key)</A>
    <LI>
      <A HREF="scripting-alpha.html#ClearTable">ClearTable(tag)</A>
    <LI>
      <A HREF="scripting-alpha.html#DontAutoHint">DontAutoHint()</A>
    <LI>
      <A HREF="scripting-alpha.html#FindOrAddCvtIndex">FindOrAddCvtIndex(value[,sign-matters])</A>
    <LI>
      <A HREF="scripting-alpha.html#GetCvtAt">GetCvtAt(index)</A>
    <LI>
      <A HREF="scripting-alpha.html#GetPrivateEntry">GetPrivateEntry(key)</A>
    <LI>
      <A HREF="scripting-alpha.html#HasPrivateEntry">HasPrivateEntry(key)</A>
    <LI>
      <A HREF="scripting-alpha.html#ReplaceGlyphCounterMasks">ReplaceGlyphCounterMasks(array)</A>
    <LI>
      <A HREF="scripting-alpha.html#ReplaceCvtAt">ReplaceCvtAt(index,value)</A>
    <LI>
      <A HREF="scripting-alpha.html#SetGlyphCounterMask">SetGlyphCounterMask(cg,hint-index,hint-index,...)</A>
    <LI>
      <A HREF="scripting-alpha.html#SubstitutionPoints">SubstitutionPoints()</A>
  </UL>
  <H3 ALIGN=Center>
    Built-in procedures that act like the <A NAME="metrics-menu">Metrics Menu</A>
  </H3>
  <UL>
    <LI>
      <A HREF="scripting-alpha.html#AutoKern">AutoKern(spacing,threshold,subtable-name[,kernfile])</A>
    <LI>
      <A HREF="scripting-alpha.html#AutoWidth">AutoWidth(spacing)</A>
    <LI>
      <A HREF="scripting-alpha.html#CenterInWidth">CenterInWidth()</A>
    <LI>
      <A HREF="scripting-alpha.html#SetKern">SetKern(ch2,offset[,lookup-subtable])</A>
    <LI>
      <A HREF="scripting-alpha.html#RemoveAllKerns">RemoveAllKerns()</A>
    <LI>
      <A HREF="scripting-alpha.html#RemoveAllVKerns">RemoveAllVKerns()</A>
    <LI>
      <A HREF="scripting-alpha.html#SetLBearing">SetLBearing(lbearing[,relative])</A>
    <LI>
      <A HREF="scripting-alpha.html#SetRBearing">SetRBearing(rbearing[,relative])</A>
    <LI>
      <A HREF="scripting-alpha.html#SetVKern">SetVKern(ch2,offset[,lookup-subtable])</A>
    <LI>
      <A HREF="scripting-alpha.html#SetVWidth">SetVWidth(vertical-width[,relative])</A>
    <LI>
      <A HREF="scripting-alpha.html#SetWidth">SetWidth(width[,relative])</A>
    <LI>
      <A HREF="scripting-alpha.html#VKernFromHKern">VKernFromHKern()</A>
  </UL>
  <H3 ALIGN=Center>
    <A NAME="MM">Multiple master routines</A>
  </H3>
  <UL>
    <LI>
      <A HREF="scripting-alpha.html#MMAxisBounds">MMAxisBounds(axis)</A>
    <LI>
      <A HREF="scripting-alpha.html#MMAxisNames">MMAxisNames()</A>
    <LI>
      <A HREF="scripting-alpha.html#MMBlendToNewFont">MMBlendToNewFont(weights)</A>
    <LI>
      <A HREF="scripting-alpha.html#MMChangeInstance">MMChangeInstance(instance)</A>
    <LI>
      <A HREF="scripting-alpha.html#MMChangeWeight">MMChangeWeight(weights)</A>
    <LI>
      <A HREF="scripting-alpha.html#MMInstanceNames">MMInstanceNames()</A>
    <LI>
      <A HREF="scripting-alpha.html#MMWeightedName">MMWeightedName()</A>
  </UL>
  <H3 ALIGN=Center>
    <A NAME="CID">CID routines</A>
  </H3>
  <UL>
    <LI>
      <A HREF="scripting-alpha.html#CIDChangeSubFont">CIDChangeSubFont(new-sub-font-name)</A>
    <LI>
      <A HREF="scripting-alpha.html#CIDFlatten">CIDFlatten()</A>
    <LI>
      <A HREF="scripting-alpha.html#CIDFlattenByCMap">CIDFlattenByCMap(cmap-filename)</A>
    <LI>
      <A HREF="scripting-alpha.html#CIDSetFontNames">CIDSetFontNames(fontname[,family[,fullname[,weight[,copyright-notice]]]])</A>
    <LI>
      <A HREF="scripting-alpha.html#ConvertToCID">ConvertToCID(registry, ordering,
      supplement)</A>
    <LI>
      <A HREF="scripting-alpha.html#ConvertByCMap">ConvertByCMap(cmapfilename)</A>
    <LI>
      <A HREF="scripting-alpha.html#PreloadCidmap">PreloadCidmap(filename,registry,ordering,supplement)</A>
  </UL>
  <H3 ALIGN=Center>
    <A NAME="user">User Interaction</A>
  </H3>
  <UL>
    <LI>
      <A HREF="scripting-alpha.html#AskUser">AskUser(question[,default-answer])</A>
    <LI>
      <A HREF="scripting-alpha.html#Error">Error(str)</A>
    <LI>
      <A HREF="scripting-alpha.html#PostNotice">PostNotice(str)</A>
    <LI>
      <A HREF="scripting-alpha.html#Print">Print(arg1,arg2,arg3,...)</A>
  </UL>
  <H3 ALIGN=Center>
    <A NAME="prefs">Preferences</A>
  </H3>
  <UL>
    <LI>
      <A HREF="scripting-alpha.html#DefaultOtherSubrs">DefaultOtherSubrs()</A>
    <LI>
      <A HREF="scripting-alpha.html#GetPref">GetPref(str)</A>
    <LI>
      <A HREF="scripting-alpha.html#LoadEncodingFile">LoadEncodingFile(filename,[encname])</A>
    <LI>
      <A HREF="scripting-alpha.html#LoadNamelist">LoadNamelist(filename)</A>
    <LI>
      <A HREF="scripting-alpha.html#LoadNamelistDir">LoadNamelistDir([directory-name])</A>
    <LI>
      <A HREF="scripting-alpha.html#LoadPlugin">LoadPlugin(filename)</A>
    <LI>
      <A HREF="scripting-alpha.html#LoadPluginDir">LoadPluginDir([directory-name])</A>
    <LI>
      <A HREF="scripting-alpha.html#LoadPrefs">LoadPrefs()</A>
    <LI>
      <A HREF="scripting-alpha.html#ReadOtherSubrsFile">ReadOtherSubrsFile(filename)</A>
    <LI>
      <A HREF="scripting-alpha.html#SavePrefs">SavePrefs()</A>
    <LI>
      <A HREF="scripting-alpha.html#SetPref">SetPref(str,val[,val2])</A>
    <LI>
      It it also possible to get the value of a preference item by preceding its
      name with a dollar sign.
  </UL>
  <H3 ALIGN=Center>
    <A NAME="math">Math</A>
  </H3>
  <UL>
    <LI>
      <A HREF="scripting-alpha.html#ATan2">ATan2(val1,val2)</A>
    <LI>
      <A HREF="scripting-alpha.html#Ceil">Ceil(real)</A>
    <LI>
      <A HREF="scripting-alpha.html#Chr">Chr(int)</A>
    <LI>
      <A HREF="scripting-alpha.html#Cos">Cos(val)</A>
    <LI>
      <A HREF="scripting-alpha.html#Exp">Exp(val)</A>
    <LI>
      <A HREF="scripting-alpha.html#Floor">Floor(real)</A>
    <LI>
      <A HREF="scripting-alpha.html#Int">Int(real)</A>
    <LI>
      <A HREF="scripting-alpha.html#IsFinite">IsFinite(real)</A>
    <LI>
      <A HREF="scripting-alpha.html#IsNan">IsNan(real)</A>
    <LI>
      <A HREF="scripting-alpha.html#Log">Log(val)</A>
    <LI>
      <A HREF="scripting-alpha.html#Ord">Ord(string[,pos])</A>
    <LI>
      <A HREF="scripting-alpha.html#Pow">Pow(val1,val2)</A>
    <LI>
      <A HREF="scripting-alpha.html#Rand">Rand()</A>
    <LI>
      <A HREF="scripting-alpha.html#Real">Real(int)</A>
    <LI>
      <A HREF="scripting-alpha.html#Round">Round(real)</A>
    <LI>
      <A HREF="scripting-alpha.html#Sin">Sin(val)</A>
    <LI>
      <A HREF="scripting-alpha.html#Sqrt">Sqrt(val)</A>
    <LI>
      <A HREF="scripting-alpha.html#Strskipint">Strskipint(str[,base])</A>
    <LI>
      <A HREF="scripting-alpha.html#Strtod">Strtod(str)</A>
    <LI>
      <A HREF="scripting-alpha.html#Strtol">Strtol(str[,base])</A>
    <LI>
      <A HREF="scripting-alpha.html#Tan">Tan(val)</A>
    <LI>
      <A HREF="scripting-alpha.html#ToString">ToString(arg)</A>
    <LI>
      <A HREF="scripting-alpha.html#UCodePoint">UCodePoint(int)</A>
  </UL>
  <H3 ALIGN=Center>
    <A NAME="unicode">Unicode</A>
  </H3>
  <UL>
    <LI>
      <A HREF="scripting-alpha.html#NameFromUnicode">NameFromUnicode(uni[,namelist])</A>
    <LI>
      <A HREF="scripting-alpha.html#UCodePoint">UCodePoint(int)</A>
    <LI>
      <A HREF="scripting-alpha.html#UnicodeFromName">UnicodeFromName(name)</A>
    <LI>
      <A HREF="scripting-alpha.html#Ucs4">Ucs4(str)</A>
    <LI>
      <A HREF="scripting-alpha.html#Utf8">Utf8(int)</A>
  </UL>
  <H3 ALIGN=Center>
    <A NAME="strings">String manipulation</A>
  </H3>
  <UL>
    <LI>
      <A HREF="scripting-alpha.html#Chr">Chr(int)</A>
    <LI>
      <A HREF="scripting-alpha.html#GetEnv">GetEnv(str)</A>
    <LI>
      <A HREF="scripting-alpha.html#NameFromUnicode">NameFromUnicode(uni[,namelist])</A>
    <LI>
      <A HREF="scripting-alpha.html#Ord">Ord(string[,pos])</A>
    <LI>
      <A HREF="scripting-alpha.html#Strcasecmp">Strcasecmp(str1,str2)</A>
    <LI>
      <A HREF="scripting-alpha.html#Strcasestr">Strcasestr(haystack,needle)</A>
    <LI>
      <A HREF="scripting-alpha.html#Strftime">Strftime(format[,isgmt[,locale]])</A>
    <LI>
      <A HREF="scripting-alpha.html#StrJoin">StrJoin(array,delimiter)</A>
    <LI>
      <A HREF="scripting-alpha.html#Strlen">Strlen(str)</A>
    <LI>
      <A HREF="scripting-alpha.html#Strrstr">Strrstr(haystack,needle)</A>
    <LI>
      <A HREF="scripting-alpha.html#Strskipint">Strskipint(str[,base])</A>
    <LI>
      <A HREF="scripting-alpha.html#StrSplit">StrSplit(str,delimiter[,max-count])</A>
    <LI>
      <A HREF="scripting-alpha.html#Strstr">Strstr(haystack,needle)</A>
    <LI>
      <A HREF="scripting-alpha.html#Strsub">Strsub(str,start[,end])</A>
    <LI>
      <A HREF="scripting-alpha.html#Strtod">Strtod(str)</A>
    <LI>
      <A HREF="scripting-alpha.html#Strtol">Strtol(str[,base])</A>
    <LI>
      <A HREF="scripting-alpha.html#ToString">ToString(arg)</A>
    <LI>
      <A HREF="scripting-alpha.html#UnicodeFromName">UnicodeFromName(name)</A>
    <LI>
      <A HREF="scripting-alpha.html#Ucs4">Ucs4(str)</A>
    <LI>
      <A HREF="scripting-alpha.html#Utf8">Utf8(int)</A>
  </UL>
  <H3 ALIGN=Center>
    <A NAME="Character">Character Manipulation</A>
  </H3>
  <UL>
    <LI>
      <A HREF="scripting-alpha.html#IsAlNum">IsAlNum(val)</A>
    <LI>
      <A HREF="scripting-alpha.html#IsAlpha">IsAlpha(val)</A>
    <LI>
      <A HREF="scripting-alpha.html#IsDigit">IsDigit(val)</A>
    <LI>
      <A HREF="scripting-alpha.html#IsHexDigit">IsHexDigit(val)</A>
    <LI>
      <A HREF="scripting-alpha.html#IsLower">IsLower(val)</A>
    <LI>
      <A HREF="scripting-alpha.html#IsSpace">IsSpace(val)</A>
    <LI>
      <A HREF="scripting-alpha.html#IsUpper">IsUpper(val)</A>
    <LI>
      <A HREF="scripting-alpha.html#ToLower">ToLower(val)</A>
    <LI>
      <A HREF="scripting-alpha.html#ToMirror">ToMirror(val)</A>
    <LI>
      <A HREF="scripting-alpha.html#ToUpper">ToUpper(val)</A>
  </UL>
  <H3 ALIGN=Center>
    <A NAME="arrays">Arrays</A>
  </H3>
  <UL>
    <LI>
      <A HREF="scripting-alpha.html#Array">Array(size)</A>
    <LI>
      <A HREF="scripting-alpha.html#SizeOf">SizeOf(arr)</A>
  </UL>
  <H3 ALIGN=Center>
    <A NAME="misc">Miscellaneous</A>
  </H3>
  <UL>
    <LI>
      <A HREF="scripting-alpha.html#InFont">InFont(arg)</A>
    <LI>
      <A HREF="scripting-alpha.html#TypeOf">TypeOf(any)</A>
  </UL>
  <H3 ALIGN=Center>
    <A NAME="Deprecated">Deprecated Names</A>
  </H3>
  <UL>
    <LI>
      <A HREF="scripting-alpha.html#ClearGlyphCounterMasks">ClearCharCounterMasks()</A>
    <LI>
      <A HREF="scripting-alpha.html#GlyphInfo">CharInfo(str)</A>
    <LI>
      <A HREF="scripting-alpha.html#ReplaceGlyphCounterMasks">ReplaceCharCounterMasks(array)</A>
    <LI>
      <A HREF="scripting-alpha.html#SetGlyphColor">SetCharColor(color)</A>
    <LI>
      <A HREF="scripting-alpha.html#SetGlyphComment">SetCharComment(comment)</A>
    <LI>
      <A HREF="scripting-alpha.html#SetGlyphCounterMask">SetCharCounterMask(cg,hint-index,hint-index,...)</A>
    <LI>
      <A HREF="scripting-alpha.html#SetGlyphName">SetCharName(name[,set-from-name-flag])</A>
  </UL>
  <P>
    <HR>
  <H2>
    <A NAME="Example">Example</A>s
  </H2>
  <UL>
    <LI>
      <A HREF="https://github.com/fontforge/fontforge/tree/master/test">FontForge's
      testsuite in the test subdirectory</A> (such as it is)
    <LI>
      <A HREF="scripts/">Directory of donated scripts</A>
    <LI>
      Scripts used in other projects
      <UL>
	<LI>
	  <A HREF="http://sourceforge.net/projects/x-symbol/">x-symbol</A>
      </UL>
    <LI>
      <A HREF="scripting-tutorial.html">the scripting tutorial</A>
  </UL>
  <H3>
    Example 1:
  </H3>
  <BLOCKQUOTE>
    <PRE>#Set the color of all selected glyphs to be yellow
#designed to be run within an interactive fontforge session.
foreach
  SetCharColor(0xffff00)
endloop
</PRE>
  </BLOCKQUOTE>
  <H3>
    Example 2:
  </H3>
  <BLOCKQUOTE>
    <PRE>#!/usr/local/bin/fontforge
#This is the sfddiff script which compares two fonts

if ( Strtol($version) &lt; 20060330 )
  Error( "Please upgrade to a more recent version of fontforge" )
endif

flags=0x789
outfile=""

while ( $argc &gt; 1 &amp;&amp; Strsub($1,0,1)=="-" )
  temp = $1
  if ( Strsub(temp,1,2)=='-' )
    temp = Strsub(temp,1)
  endif

  if ( temp=="-ignorehints" )
    flags = flags &amp; ~0x8
  elseif ( temp=="-ignorenames" )
    flags = flags &amp; ~0x100
  elseif ( temp=="-ignoregpos" )
    flags = flags &amp; ~0x200
  elseif ( temp=="-ignoregsub" )
    flags = flags &amp; ~0x400
  elseif ( temp=="-ignorebitmaps" )
    flags = flags &amp; ~0x80
  elseif ( temp=="-exact" )
    flags = flags | 0x2
  elseif ( temp=="-warn" )
    flags = flags | 0x44
  elseif ( temp=="-merge" )
    flags = flags | 0x1800
    shift
    outfile = $1
  elseif ( temp=="-help" )
    Print( "sfddiff: [--version] [--help] [--usage] [--ignorehints] [--ignorenames] [--ignoregpos] [--ignoregsup] [--ignorebitmaps] [--warn] [--exact] fontfile1 fontfile2" )
    Print( " Compares two fontfiles" )
    Print( " --ignorehints: Do not compare postscript hints or truetype instructions" )
    Print( " --ignorenames: Do not compare font names" )
    Print( " --ignoregpos:  Do not compare kerning, etc." )
    Print( " --ignoregsub:  Do not compare ligatures, etc." )
    Print( " --ignorebitmaps: Do not compare bitmap strikes" )
    Print( " --exact:       Normally sfddiff will match contours which are not exact" )
    Print( "                but where the differences are slight (so you could compare" )
    Print( "                truetype and postscript and get reasonable answers). Also" )
    Print( "                normally sfddiff will unlink references before it compares" )
    Print( "                (so you can compare a postscript font (with no references)" )
    Print( "                to the original source (which does have references)). Setting")
    Print( "                this flag means glyphs must match exactly.")
    Print( " --warn:        Provides a warning when an exact match is not found" )
    Print( " --merge outfile: Put any outline differences in the backgrounds of" )
    Print( "                appropriate glyphs" )
return(0)
  elseif ( temp=="-version" )
    Print( "Version 1.0" )
return(0)
  else
break
  endif
  shift
endloop

if ( $argc!=3 || $1=="--usage" || $1=="-usage" )
  Print( "sfddiff: [--version] [--help] [--usage] [--ignorehints] [--ignorenames] [--ignoregpos] [--ignoregsup] [--ignorebitmaps] [--warn] [--exact] [--merge outfile] fontfile1 fontfile2" )
return(0)
endif

Open($2)
Open($1)
CompareFonts($2,"-",flags)
if ( outfile!="" )
  Save(outfile)
endif
</PRE>
  </BLOCKQUOTE>
  <H3>
    Example 3:
  </H3>
  <BLOCKQUOTE>
    <PRE>#!/usr/local/bin/fontforge
#Take a Latin font and apply some simple transformations to it
#prior to adding cyrillic letters.
#can be run in a non-interactive fontforge session.
Open($1);
Reencode("KOI8-R");
Select(0xa0,0xff);
//Copy those things which look just like latin
BuildComposit();
BuildAccented();

//Handle Ya which looks like a backwards "R"
Select("R");
Copy();
Select("afii10049");
Paste();
HFlip();
CorrectDirection();
Copy();
Select(0u044f);
Paste();
CopyFgToBg();
Clear();

//Gamma looks like an upside-down L
Select("L");
Copy();
Select(0u0413);
Paste();
VFlip();
CorrectDirection();
Copy();
Select(0u0433);
Paste();
CopyFgToBg();
Clear();

//Prepare for editing small caps K, etc.
Select("K");
Copy();
Select(0u043a);
Paste();
CopyFgToBg();
Clear();

Select("H");
Copy();
Select(0u043d);
Paste();
CopyFgToBg();
Clear();

Select("T");
Copy();
Select(0u0442);
Paste();
CopyFgToBg();
Clear();

Select("B");
Copy();
Select(0u0432);
Paste();
CopyFgToBg();
Clear();

Select("M");
Copy();
Select(0u043C);
Paste();
CopyFgToBg();
Clear();

Save($1:r+"-koi8-r.sfd");
Quit(0);
</PRE>
  </BLOCKQUOTE>
  <H2>
    The <A NAME="Execute">Execute</A> Script dialog
  </H2>
  <P>
  This dialog allows you to type a script directly in to FontForge and then
  run it. Of course the most common case is that you'll have a script file
  somewhere that you want to execute, so there's a button [Call] down at the
  bottom of the dlg. Pressing [Call] will bring up a file picker dlg looking
  for files with the extension *.pe (you can change that by typing a wildcard
  sequence and pressing the [Filter] button). After you have selected your
  script the appropriate text to text to invoke it will be placed in the text
  area.
  <P>
  The current font of the script will be set to whatever font you invoked it
  from (in python this is <CODE>fontforge.activeFontInUI()</CODE>).
  <P>
  Note that if you try to print from a script the output will go to stdout.
  If you have invoked fontforge from a window manager's menu stdout will often
  be bound to /dev/null and not useful. Try starting fontforge from the command
  line instead.
  <H2>
    The Scripts <A NAME="menu">Menu</A>
  </H2>
  <P>
  You can use the preference dialog to create a list of frequently used scripts.
  Invoke <A HREF="prefs.html#scripts">File-&gt;Preferences</A> and select the
  Scripts tag. In this dialog are ten possible entries, each one should have
  a name (to be displayed in the menu) and an associated script file to be
  run.
  <P>
  After you have set up your preferences you can invoke scripts from the font
  view, either directly from the menu (File-&gt;Scripts-&gt;&lt;your name&gt;)
  or by a hot key. The first script you added will be invoked by Cnt-Alt-1,
  then second by Cnt-Alt-2, and the tenth by Cnt-Alt-0.
  <P>
  The current font of the script will be set to whatever font you invoked it
  from.
  <P>
  <P ALIGN=Center>
  -- <A HREF="HotKeys.html">Prev</A> -- <A HREF="overview.html">TOC</A> --
  <A HREF="PfaEdit-TeX.html">Next</A> --
</DIV>
</BODY></HTML>
